home *** CD-ROM | disk | FTP | other *** search
- /*
- File: FontDBasePrivate.h
-
- Contains: QuickDraw GX to PostScript conversion code.
- File contains private ata structures and definitions
- for the font database.
-
- Version: Technology: Quickdraw GX 1.1.x
-
- Copyright: © 1991-1997 by Apple Computer, Inc., all rights reserved.
- */
-
- #include <Collections.h>
- #include <GXTypes.h>
- #include <ScalerTypes.h>
- #include "GXPrintingUniverse.h"
- #include "FontDatabase.h"
-
- /***********************
- struct TFDBEntry:
-
- This structure is the data for a document
- font data base entry.
-
- ************************/
- typedef struct {
-
- long firstPage; // First page the font is used.
- long flags; // font info flags.
- gxFlatFontListItem fontInfo; // The font information.
-
- } TFDBEntry;
-
-
- /**************************
-
- struct: TFontDbaseRec
-
- This structure is the font database.
- Contains all font information for a document.
-
- ****************************/
-
- #define fdbThisVersion 0x00010000
-
- typedef struct {
-
- Fixed dbaseVersion; // Version number of the database.
- long numFonts; // Number of fonts for the document.
-
- long numFileFonts; // How many fonts were in the spool file.
- Handle hFileFonts; // Handle containing fonts from resource file.
-
- Collection docFonts; // The collection of document font data offsets by font ID.
- long nextOffset; // Next offset to use for adding to the database.
-
- scalerStreamTypeFlag streamTypes; // Stream types used to build prerequisites.
- Collection prerequisites; // Collection tag is font format, ID is prerequisite enumeration.
- // Data is prerequisite record but enumeration is replaced with a font reference.
-
- long currPage; // Current page number.
- long lockCount; // Lock count for database.
-
- TFDBEntry fontDbaseInfo[1]; // Storage for font database.
-
- } TFontDbaseRec, *TFontDbasePtr, **TFontDbaseHdl;
-
-
- #define kFontDbaseResType (ResType)'dbas'
-
- //#pragma parameter __D0 NoGlueGetHandleSize(__A0)
- //pascal Size NoGlueGetHandleSize(Handle h) = 0xA025;
-
- #define GetHandleArray(h, index) ((Handle*)*(h))[index]
-
- #if THINK_C >= 5 || applec
- pascal Handle XGetNextFOND(Handle fontHandle) = {0x700A, 0xA822}; /* this disappeared in the latest release of THINK C */
- #else
- #define XGetNextFOND GetNextFOND
- #endif
-
- #define pointSizeIndex 0
- #define styleBitsIndex 1
- #define rsrcIDIndex 2
- #define shortsInAFATRecord 3
- #define bytesInAFATRecord (shortsInAFATRecord * sizeof(short))
-
- #define kTakeThisSfntResource (-1) /* this value in the point size field signals an sfnt that matched */
-
- /**** Prototypes for intra-segment private routines ****/
-
- OSErr FDBPrereqToHandle(gxFont theFont, scalerPrerequisiteItem *item, Handle h);
-
- OSErr FDBFontToHandle(gxFont fontID, long glyphBits[], Handle h);
-
- OSErr CreatePartialStreamTempFile( TFile *filerefPtr, Handle *streamHdlPtr );
-
- void DisposePartialStreamTempFile( TFile fileref, Handle streamHdl );
-
- /************** Prototypes for intra-segment calling of exported routines *************************/
-
- OSErr FontDbaseGetIndexedFont(TFontDbase fontDbase, long index, gxFont *fontID);
-
- OSErr FontDbaseGetIndexedPrerequisite(TFontDbase fontDbase, long idx, long *size, gxFont *theFont, scalerPrerequisiteItem *item);
-
- OSErr FontDbaseBuildPrerequisiteList(TFontDbase fontDbase, scalerStreamTypeFlag streamTypes, char *productDescription, Boolean useMessages, long *count);
-
- OSErr FontDbaseGetFontInfo(TFontDbase fontDbase, gxFont fontID, long *glyphCount, long *axisCount, long *variationCount, TfdbInfoFlags *flags);
-
- OSErr FontDbaseSetFontFlags(TFontDbase fontDbase, gxFont fontID, TfdbInfoFlags flags);
-
- OSErr FontDbaseGetGlyphBits(TFontDbase fontDbase, gxFont fontID, long snapshot, unsigned long* *glyphBits, gxFontVariation* *variations);
-
- OSErr FontDbaseExcludePrerequisite(TFontDbase fontDbase, gxFont theFont, Boolean exclude);
-
- OSErr FontDbaseUnion(TFontDbase source, TFontDbase target);
-